package asteroids.expressions;

import java.util.Map;

import be.kuleuven.cs.som.annotate.Basic;

import asteroids.Ship;
import asteroids.types.*;

public class DoubleLiteral extends BasicExpression {
	
	private DoubleType value;

	public DoubleLiteral(int line, int column, double value) {
		super(line, column);
		this.value = new DoubleType(value);
	}

	@Basic
	public DoubleType getValue(){
		return value;
	}
	
	@Override
	public Type evaluate(Ship ship, Map<String, Type> globals) {
		return value;
	}
	
	@Override
	public String toString(){
		return "" + getValue().getValue();
	}
	
}
